<template>
  <div>
    <h2>班级名字：{{name}}</h2>
    <h2>班级人数：{{count}}</h2>
    <button @click="sendName()">发送班级名字</button>
  </div>
</template>
  
<script>
  export default {
    name: 'Banji',
    props: ['name', 'count'],
    data() {
      return {
        
      }
    },
    methods: {
      sendName() {
        this.$bus.$emit('updateBanjiName', this.name)
      }
    }
  }
</script>
 
<style scoped>
   
</style>